struct microcode_amd *mc_amd,
const void *buf,
size_t bufsize,
- unsigned long *offset)
+ size_t *offset)
{
const uint8_t *bufp = buf;
- unsigned long off;
+ size_t off;
const struct mpbhdr *mpbuf;
off = *offset;
return -EINVAL;
}
- printk(KERN_DEBUG "microcode: size %lu, block size %u, offset %ld\n",
+ printk(KERN_DEBUG "microcode: size %zu, block size %u, offset %zu\n",
bufsize, mpbuf->len, off);
if ( (off + mpbuf->len) > bufsize )
static int install_equiv_cpu_table(
struct microcode_amd *mc_amd,
const uint32_t *buf,
- unsigned long *offset)
+ size_t *offset)
{
const struct mpbhdr *mpbuf = (const struct mpbhdr *)&buf[1];
#define PRIpaddr "016lx"
#endif
+#if defined(__SIZE_TYPE__)
+typedef __SIZE_TYPE__ size_t;
+#elif defined(__i386__)
+typedef unsigned int size_t;
+#else
typedef unsigned long size_t;
+#endif
typedef char bool_t;
#define test_and_set_bool(b) xchg(&(b), 1)